import tpl from './index.ejs';
import './index.scss';
import tab from './tab';
import list from './list';
import courseFieldData from '../../data/courseFieldData';
import courseData from '../../data/courseData';

const tabComponent = tab();
const listComponent = list();
import { tplReplace } from '../../utils/tool';
console.log(listComponent.tpl(courseData));
export default () => {
    return {
        name: 'courseTab',
        tpl() {
            return tplReplace(tpl,{
                tabList:`<ul>${tabComponent.tpl(courseFieldData)}</ul>`,
                cardList: listComponent.tpl(courseData)
            });
        }
    }
}